package org.noip.amdg;

import java.util.ArrayList;
import java.util.List;

public class Bucket {

	private final List<Problem> problems = new ArrayList<Problem>();
	private final int size;
	
	public Bucket(int size) {
		this.size = size;
	}
	
	public boolean addProblem(Problem problem) {
		problems.add(problem);
		return problems.size() >= size;
	}
	
	public List<Problem> getProblems() {
		return problems;
	}
	
	public boolean isFull() {
		return size <= problems.size();
	}
	
	public void clear() {
		problems.clear();
	}
}
